/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.cash.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.chlitina.store.common.persistence.BaseDao;
import com.chlitina.store.common.persistence.BaseDaoImpl;
import com.chlitina.store.modules.cash.entity.StoreConsumeDoCare;
import com.chlitina.store.modules.cash.entity.StoreConsumeNewCard;

/**
 * 新开卡业务消费DAO接口
 * @author liujiang
 * @version 2013-11-24
 */
public interface StoreConsumeNewCardDao extends StoreConsumeNewCardDaoCustom, CrudRepository<StoreConsumeNewCard, Long> {
	@Modifying
	@Query("from StoreConsumeNewCard where CONSUME_ID=?1")
	public List<StoreConsumeNewCard> findListByConsume(Long consumeID);
	@Modifying
	@Query("from StoreConsumeNewCard where CARD_TYPE=?1")
	public List<StoreConsumeNewCard> findListByCardType(int cardType);
}

/**
 * DAO自定义接口
 * @author liujiang
 */
interface StoreConsumeNewCardDaoCustom extends BaseDao<StoreConsumeNewCard> {

}

/**
 * DAO自定义接口实现
 * @author liujiang
 */
@Component
class StoreConsumeNewCardDaoImpl extends BaseDaoImpl<StoreConsumeNewCard> implements StoreConsumeNewCardDaoCustom {

}
